package com.platform.hjt.flow.service;

import java.util.List;

import org.snaker.engine.core.AccessService;

import com.platform.hjt.sys.model.SysUserInfo;

public class SnakerMyQuery extends AccessService {

	public String[] getTaskActorsNameByTaskId(String taskId) {
		String sql = "select s.* from wf_task_actor t join sys_user_info s on t.actor_Id = s.sys_user_info_id and task_Id =  ?";
		List<SysUserInfo> actors = access().queryList(SysUserInfo.class, sql, taskId);
		if(actors == null || actors.isEmpty()) return null;
		String[] actorIds = new String[actors.size()];
		for(int i = 0; i < actors.size(); i++) {
			SysUserInfo ta = actors.get(i);
			actorIds[i] = ta.getUserName();
		}
		return actorIds;
	}
	
}
